package com.baidu.service.impl;

import com.baidu.dao.ExhibitionMapper;
import com.baidu.dao.UserMapper;
import com.baidu.pojo.Exhibition;
import com.baidu.service.ExhibitionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ExhibitionServiceImpl implements ExhibitionService {
    @Autowired
    private ExhibitionMapper exhibitionMapper;
    @Override
    public List<Exhibition> getExhibition(String name) {
        return exhibitionMapper.getExhibition(name);
    }

    @Override
    public Exhibition getExhibitionById(Integer eid) {
        return exhibitionMapper.getExhibitionById(eid);
    }


    //添加展会信息
    public void addExhibition(Exhibition exhibition){
        exhibitionMapper.addExhibition(exhibition);
    }

    @Override
    public void deleteExhibition(Integer eid) {
        exhibitionMapper.deleteExhibition(eid);
    }

    //修改展会信息
    public void updateExhibition(Exhibition exhibition){
        exhibitionMapper.updateExhibition(exhibition);
    }

    @Override
    public int count() {
        return exhibitionMapper.count();
    }

    @Override
    public List<Exhibition> getByPage(Integer start, Integer pageSize) {
        return exhibitionMapper.getByPage(start,pageSize);
    }

    @Override
    public Exhibition getExhibitionByTid(Integer eid) {
        return exhibitionMapper.getExhibitionByTid(eid);
    }

    @Override
    public void updateExhibitionByOid(Exhibition exhibition) {
        exhibitionMapper.updateExhibitionByOid(exhibition);
    }

    //查询所有展会信息
    //查询所有展会
    public List<Exhibition> getAllExhibition(){
        return exhibitionMapper.getAllExhibition();
    }

}
